package com.netik.main;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class LoginActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
	private EditText user;
	private EditText pass;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loginpage);
        Button button = (Button)findViewById(R.id.button1);
        button.setOnClickListener(this);
        
    }

	@Override
	public void onClick(View view) {

		user = (EditText) findViewById(R.id.editText1);
		pass = (EditText) findViewById(R.id.editText2);
		
		System.out.println("user::::" +user.getText().toString());
		System.out.println("pass::::" +pass.getText().toString());
		/*
		if(user.getText().toString().equalsIgnoreCase("ssyed") 
				&& pass.getText().toString().equalsIgnoreCase("ssyed"))
		{
			Intent myIntent = new Intent(view.getContext(), WelcomeActivity.class);
            startActivityForResult(myIntent, 0);
            System.out.println("welcome activity........");
		}else{
			Intent myIntent = new Intent(view.getContext(), LoginActivity.class);
            startActivityForResult(myIntent, 0);
            System.out.println("login activity........");
		}
		*/
		/*
		 * call web service to check authentication of user
		 */
		Intent intent1 = new Intent(this,Homepage.class);
		startActivity(intent1);
	}
    

}